package com.warm.pump.module.skd.dao.gen;

import java.util.List;
import java.util.HashMap;
import java.util.Map;
import java.util.Date;
import java.math.BigDecimal;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
import com.warm.pump.frame.gen.bean.PageBean;
import com.warm.pump.frame.gen.util.TypeCast;
import com.warm.pump.frame.gen.exception.ServiceException;
import com.warm.pump.module.skd.bean.bo.gen.SkdBo;
import com.warm.pump.module.skd.mapper.gen.SkdBoMapper;
@Repository
public class SkdBoDao  {
	// 日志对象
	private transient Log log = LogFactory.getLog(this.getClass());
	@Autowired
	private SkdBoMapper skdBoMapper;

	public Integer selectJobDtlNextExecNum(Map conditionMap){
		return skdBoMapper.selectJobDtlNextExecNum(conditionMap);
	}
    public List<Long> selectWorkIdByJobId(Map conditionMap){
        return skdBoMapper.selectWorkIdByJobId(conditionMap);
    }
    public PageBean selectWorkIdByJobIdPage(Map conditionMap,int pageNo,int pageSize){
        Integer count = selectWorkIdByJobIdCount(conditionMap);
        PageBean pageBean = new PageBean();
        pageBean.setCount(count);
        pageBean.setPageNo(pageNo);
        pageBean.setPageSize(pageSize);
        conditionMap.put("limitStart",pageBean.getStartNo());
        conditionMap.put("limitOffset",pageSize);
        pageBean.setData(skdBoMapper.selectWorkIdByJobId(conditionMap));
        return pageBean;
    }
    public Integer selectWorkIdByJobIdCount(Map conditionMap){
        return skdBoMapper.selectWorkIdByJobIdCount(conditionMap);
    }
}
